//
//  DatePickerViewController.h
//  IWeighMyself
//
//  Created by Francisco Gindre on 8/21/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LogNewWeightViewController.h"

@interface DatePickerViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
	/*
	 table view containing the date cell
	 */
	UITableView *tableView;
	/*
	 the date picker
	 */
	
	UIDatePicker *datePicker;
	
	/*
	 parent view controller that receives the new date
	 */
	
	LogNewWeightViewController * newWeightView; 
	
	/*
	 done button that appears only if there are changes
	 */
	UIBarButtonItem *doneButton;
	
	/*
	 the cell containing the date
	 */
	UITableViewCell *dateCell;
	

	
	
	
}

@property (nonatomic,retain) IBOutlet UITableView *tableView;
@property (nonatomic,retain) IBOutlet UIDatePicker *datePicker;
@property (nonatomic,retain) LogNewWeightViewController *newWeightView;
@property (nonatomic,retain) UIBarButtonItem *doneButton;
@property (nonatomic,retain) UITableViewCell *dateCell;

-(id)initWithParentView:(LogNewWeightViewController*)newWeightController aDate:(NSDate*)date;

-(IBAction)datePickerFlicked:(id)sender;

-(void)doneAction:(id)sender;
@end
